package com.example.designpattenexample.flyweight.example;

public class Game {
    public static void main(String[] args) {
        Chesspiece white1 = ChesspieceFactory.getChesspiece("WHITE");
        white1.put(1,2);
        Chesspiece black1 = ChesspieceFactory.getChesspiece("BLACK");
        black1.put(3,4);

        Chesspiece white2 = ChesspieceFactory.getChesspiece("WHITE");
        white2.put(6,7);
        Chesspiece black2 = ChesspieceFactory.getChesspiece("BLACK");
        black2.put(8,9);

        System.out.println(black1 == black2);
        System.out.println(white1 == white2);
    }
}
